<?php
class FrontendJsonView extends JsonView
{
	private $_resultMessages = array(
		"200" => "操作成功",
		"403" => "您没有权限执行这项操作",
		"404" => "您请求的资源不存在",
		"406" => "您的输入有误，请更正后重试",
		"500" => "内部服务器错误",
	);

	public function render()
	{
		if(isset($this->result) && !isset($this->result["message"]))
		{
			$this->result["message"] = $this->_resultMessages[$this->result["code"]];
		}
		parent::render();
	}
}